<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2023/4/12
 * Time: 14:59
 */

namespace app\index\model;


use think\Model;

class CrmGroup extends Model
{

    public function addGroup($name){
        $id = self::where('name',$name)->value('id');
        if(!empty($id)){
            return $id;
        }
        return self::insertGetId(['name'=>$name,'date'=>time()]);
    }
}